package com.zimin.cloud.system.service;

import com.zimin.cloud.mine.pojo.system.business.AccountBO;
import com.zimin.cloud.mine.pojo.system.view.AccountRoleVO;
import com.zimin.cloud.mine.pojo.system.view.RoleVO;
import com.zimin.cloud.system.pojo.entity.AccountRole;
import com.zimin.mapper.pojo.IBaseService;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

/**
 * <p>
 * 用户角色关联表 服务类
 * </p>
 *
 * @author zimin
 * @since 2021-12-30 11:05
 */
public interface IAccountRoleService extends IBaseService<AccountRole> {


    /**
     * <p>根据角色ID删除中间表数据</p>
     *
     * @param idList
     * @return boolean
     * @since 2022-03-14 10:44:33
     */
    boolean removeByRoleIds(Collection<? extends Serializable> idList);

    /**
     * <p>保存账号角色</p>
     *
     * @param accountBO 用户
     * @return boolean
     * @since 2022-03-18 11:00:47
     */
    boolean save(AccountBO accountBO);

    /**
     * <p>修改账号角色</p>
     *
     * @param accountBO
     * @return boolean
     * @since 2022-03-18 11:00:57
     */
    boolean update(AccountBO accountBO);

    /**
     * <p>获取账号的角色权限</p>
     *
     * @param accountId 账号ID
     * @return java.util.List<java.lang.String>
     * @since 2022-03-18 11:39:53
     */
    List<String> getRolePermissions(String accountId);

    List<AccountRole> listByAccountId(String accountId);

}
